divert(-1)

#------------------------------------------------------------------------------
# Miscellaneous
# Allows using the '<', '>' characters in names and also permits using the dot
# notation (e.g name.operation). This is an experimental functionality which
# will eventually be changed by m4.
#------------------------------------------------------------------------------

changeword(`[_a-zA-Z<][_a-zA-Z0-9>.]*')

#------------------------------------------------------------------------------
# Macro for todo classes
# Usage:
# 	<todo>
# It's replaced by '<p class=todo>'. Meant to be placed in the line preceding
# the respective TODO text.
#------------------------------------------------------------------------------

# Quotes the empty string to impede inifinite recursion
define(`<todo>', `<p class=t`'odo>')

#------------------------------------------------------------------------------
# Macro for paragraphs that look like lists
# Usage:
# 	<pl>
# It's replaced by '<p class=list-style>'. Its usage is just like the normal
# '<p>' element
#------------------------------------------------------------------------------

define(`<pl>', `<p class=list-style>')

#------------------------------------------------------------------------------
# A link dictionary
# Usage: 
# 	links.push(`Key', `Value')
# 	links.fetch(`Key')
# Defines an associative array to store links and a way to access them. Quotes
# can be omitted when calling (e.g 'links.fetch(link_name)')
#------------------------------------------------------------------------------

define(`links.push', `define(format(``array[%s]'', `$1'), `$2')')
define(`links.fetch', `defn(format(``array[%s]'', `$1'))')

#------------------------------------------------------------------------------

divert`'dnl # Removes trailing newline and space
